import request from '@/utils/request'
import { strmd5 } from '@/utils/addmd5.js'

export function modifyPwd(data) {
  return request({
    url: '/_admin/modifyPwd',
    method: 'post',
    data: {
      admin_id: data.admin_id,
      token: data.token,
      old_pwd: strmd5(data.old_pwd),
      new_pwd: strmd5(data.new_pwd)
    }
  })
}

export function modifyInfo(data) {
  return request({
    url: '/_admin/modify',
    method: 'post',
    data: {
      admin_id: data.admin_id,
      token: data.token,
      email: data.email,
      phone: data.phone,
      account: data.account
    }
  })
}
